package nm.aleksey.shared;

import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;
import nm.aleksey.server.AuthorLocator;
import nm.aleksey.server.ClazzServiceLocator;

import java.util.List;

@Service(value = AuthorLocator.class, locator = ClazzServiceLocator.class)
public interface AuthorContext extends RequestContext {
//  Request<Void> addBook(AuthorProxy author, BookProxy book);

  // Request<Void> addBook(Long id, BookProxy book);

  Request<Void> delete(AuthorProxy author);

  // Request<Void> delete(Long id);

  Request<AuthorProxy> find(Long id);

  Request<List<AuthorProxy>> findAll();

//  Request<List<BookProxy>> getBookList(AuthorProxy author);

  // Request<List<BookProxy>> getBookList(Long id);

  Request<Void> save(AuthorProxy author);
  // Request<Void> store(AuthorProxy author);

  // Request<Void> update(AuthorProxy author);
}
